$(document).ready(function(){
    $(".changeRec").one("click",function(){
        var recName = $(".recName").text();
        var recPhone = $(".recPhone").text();
        var recAddress = $(".recAddress").text();
        $(".recName").replaceWith("<input class='c_recName' type='text'>");
        $(".recPhone").replaceWith("<input class='c_recPhone' type='text'>");
        $(".recAddress").replaceWith("<input class='c_recAddress' type='text'>");
        $(".c_recName").val(recName);
        $(".c_recPhone").val(recPhone);
        $(".c_recAddress").val(recAddress);
        $(".recAddCommit").val("确认修改");
        $(".changeRec").one("click",function(){
            $.ajax({
                type:"post",
                url:window.location.pathname,
                data:{
                    "recName":$(".c_recName").val(),
                    "recPhone":$(".c_recPhone").val(),
                    "recAddress":$(".c_recAddress").val()
                },
                success:function (data) {
                    if(data.result=='success')
                        location.reload();
                }
            });
        });
    });
});